package com.fub.positioning;

import com.fub.guidance.Point;

public class ReferencePoint {
	private String location;
	private Point position;
	private String buildingId;
	private Measurement measurement;
	private double distanceToCurrentPosition;

	/**
	 * Constructs a new reference point.
	 */
	public ReferencePoint() {
	}

	/**
	 * Constructs a new reference point
	 * 
	 * @param buildingId
	 *            the id of the building
	 * @param location
	 *            the location of the new reference point
	 * @param position
	 *            the position of the new reference point
	 * @param measurement
	 *            the measurement of the new reference point
	 */
	public ReferencePoint(String buildingId, String location, Point position,
			Measurement measurement) {
		this.buildingId = buildingId;
		this.location = location;
		this.position = position;
		this.measurement = measurement;
	}

	/**
	 * Returns the measurement of this reference point.
	 * 
	 * @return the measurement of this reference point
	 */
	public Measurement getMeasurement() {
		return this.measurement;
	}

	/**
	 * Returns the signal distance to the last measurement.
	 * 
	 * @return Returns the signal distance to the last measurement.
	 */
	public double getDistanceToCurrentPosition() {
		return this.distanceToCurrentPosition;
	}

	/**
	 * Returns the location of this reference point.
	 * 
	 * @return the location of this reference point.
	 */
	public String getLocation() {
		return this.location;
	}

	/**
	 * Returns the position of this reference point.
	 * 
	 * @return the position of this reference point
	 */
	public Point getPosition() {
		return this.position;
	}

	/**
	 * Returns the building id of this reference point.
	 * 
	 * @return the building id of this reference point
	 */
	public String getBuildingId() {
		return this.buildingId;
	}

	/**
	 * Sets the measurement of this reference point.
	 * 
	 * @param measurement
	 *            the measurement of this reference point
	 */
	public void setMeasurement(Measurement measurement) {
		this.measurement = measurement;
	}

	/**
	 * Sets the location of this of this reference point.
	 * 
	 * @param location
	 *            the location of this reference point
	 */
	public void setLocation(String location) {
		this.location = location;
	}

	/**
	 * Set the position of this reference point.
	 * 
	 * @param position
	 *            the position of this reference point
	 */
	public void setPosition(Point position) {
		this.position = position;
	}

	/**
	 * Sets the building id of this reference point.
	 * 
	 * @param buildingId
	 *            the building id of this reference point
	 */
	public void setBuildingId(String buildingId) {
		this.buildingId = buildingId;
	}

	/**
	 * Sets the signal distance to the last measurement.
	 * 
	 * @param distanceToCurrentPosition
	 *            the signal distance to the last measurement
	 */
	public void setDistanceToCurrentPosition(double distanceToCurrentPosition) {
		this.distanceToCurrentPosition = distanceToCurrentPosition;
	}

	@Override
	public String toString() {
		String result = this.location;
		result += "Distanz " + this.distanceToCurrentPosition;
		return result;
	}
}
